package com.springboot.security.config;

import com.google.common.cache.Cache;
import com.google.common.cache.CacheBuilder;

import java.util.Objects;

public class CacheFactory {

    public static Cache<String, String> cache = CacheBuilder.newBuilder().build();


    public static Cache<String, String> getCache() {
        if (Objects.isNull(cache)) {
            cache = CacheBuilder.newBuilder().build();
        }
        return cache;
    }


}
